package drds.global_transaction.api.rpc.rpc_server;

import io.netty.channel.Channel;

import java.io.IOException;
import java.util.concurrent.TimeoutException;

public interface MessageSend
{
	void synchronousSendRequest(String clientIp, String applicationId, String resourceId, Object message);

	Object asynchronousSendRequestWithTimeoutGetResponse(String clientIp, String applicationId, String resourceId, Object message) throws IOException, TimeoutException;

	Object asynchronousSendRequestWithTimeoutGetResponse(String clientIp, String applicationId, String resourceId, Object message, long timeout) throws IOException, TimeoutException;

	//
	void synchronousSendResponse(Channel channel, long messageId, Object message);

	void synchronousSendResponse(String clientIp, String applicationId, String resourceId, long messageId, Object message);

}
